'use strict';
//获取今日签到列表
exports.main = async (event, context) => {
	var blank = ""
	var myDate = new Date();
	var year = myDate.getFullYear();
	var month = (myDate.getMonth() + 1 < 10 ? '0' + (myDate.getMonth() + 1) : myDate.getMonth() + 1);
	var date = myDate.getDate() < 10 ? '0' + myDate.getDate() : myDate.getDate();
	var day=blank.concat(year, "-", month, "-", date);
	const db = uniCloud.database();
	let res = await  db.collection('jifen_record').where({
		user_id:event._wxopenid,
		type:1,
		daday:day
	}).get()
	
	
	//返回数据给客户端
	return res
};
